home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / Expander / Expander Classes / CExpanderHeader.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  2.5 KB  |  94 lines  |  [TEXT/KAHL]

  1. /***********************************************************************************
  2.     CExpanderHeader.h
  3.  
  4.     Copyright © 1994 B-Ray Software. All rights reserved.
  5.     Developed using Symantec C++ 7.0.2 and Symantec's TCL library.
  6.     Portions of this code courtesy Symantec, Inc.
  7.  
  8.     This code may be freely distributed as long as this notice remains. This code
  9.     may not be used in any commercial software without the consent of B-Ray Software.
  10.  
  11.     ---
  12.  
  13.     Header file for CExpanderHeader class.
  14.  
  15. ***********************************************************************************/
  16. #pragma once
  17.  
  18. #include "CExpanderPane.h"
  19. #include "CExpanderLabel.h"
  20. #include "CExpanderButton.h"
  21.  
  22.  
  23. class CExpanderHeader : public CExpanderPane {
  24.  
  25. TCL_DECLARE_CLASS
  26.  
  27. private:
  28.     CExpanderButton    *itsButton;
  29.     CExpanderLabel    *itsLabel;
  30.  
  31. protected:
  32.     virtual void            MakeComponents( void );
  33.     virtual void            MakeExpanderButton( void );
  34.     virtual CExpanderLabel    *MakeExpanderLabel( void );
  35.  
  36. public:
  37.  
  38.     static const short    kExpanderButtonSize;
  39.  
  40.     CExpanderHeader();
  41.     CExpanderHeader( CView *anEnclosure, CBureaucrat *aSupervisor,
  42.                      short aWidth = 0, short aHeight = 0, short aHLoc = 0, short aVLoc = 0,
  43.                      SizingOption aHSizing = sizFIXEDSTICKY, 
  44.                      SizingOption aVSizing = sizFIXEDSTICKY );
  45.     virtual ~CExpanderHeader();
  46.  
  47.     /*
  48.      * Label access routines
  49.      */
  50.     virtual void    SetTitle( Str255 aText )
  51.                         { itsLabel->SetText( aText ); };
  52.     virtual void    GetTitle( Str255 buffer )
  53.                         { itsLabel->GetText( buffer ); };
  54.  
  55.     virtual void    SetLabelSelectable( Boolean aFlag )
  56.                         { itsLabel->SetCanSelect( aFlag ); };
  57.     virtual Boolean    GetLabelSelectable( void )
  58.                         { return itsLabel->CanSelect(); };
  59.  
  60.     virtual void    SetDblClickCmd( long theCommand )
  61.                         { itsLabel->SetDblClickCmd( theCommand ); };
  62.     virtual long    GetDblClickCmd( void )
  63.                         { return itsLabel->GetDblClickCmd(); };
  64.  
  65.     /*
  66.      * Button access routines
  67.      */
  68.     virtual void    SetButtonValue( Boolean value )
  69.                         { itsButton->SetValue( value ); };
  70.     virtual Boolean    GetButtonValue( void )
  71.                         { return itsButton->GetValue(); };
  72.  
  73.     virtual void    SetButtonEnabled( Boolean value )
  74.                         { itsButton->SetEnabled( value ); };
  75.     virtual Boolean    GetButtonEnabled( void )
  76.                         { return itsButton->GetEnabled(); };
  77.  
  78.     /*
  79.      * Stream methods
  80.      */
  81.     virtual void    PutTo( CStream &stream );
  82.     virtual void    GetFrom( CStream &stream );
  83.  
  84. #ifdef NEVER
  85.     friend CStream& operator << ( CStream &s, CExpanderHeader *p )
  86.                             { return PutObject( s, p ); };
  87.     friend CStream&    operator >> ( CStream &s, CExpanderHeader*& p)
  88.                             { return GetObject( s, p ); };
  89. #endif
  90.  
  91. };
  92.  
  93.  
  94.